import React from "react";
import { Color } from "../../style/common";
import NavBarRightButton from "./NavBarRightButton";
import { Platform, Text } from "react-native";
const defaultConfig = (navigation, isSetNotShow = false) => ({
  headerTitleStyle: {
    color: "#fff"
  },
  headerTintColor: "#fff",
  gesturesEnabled: true,
  headerStyle: {
    backgroundColor: Color,
    borderBottomColor: Color
  },
  mode: "crad", // card: 默認效果；model：從底部彈出,
  // headerMode: 'float',
  headerRight: <NavBarRightButton {...navigation} isSetNotShow={isSetNotShow}/>
});

const NavBarConfig = (config = {}, navigation) => {
  return Object.assign({}, defaultConfig(navigation, config.isSetNotShow), config);
};

export default NavBarConfig;
